Skip to content

container.*: fix stubtest errors - #2454

Merged
WyattBlue merged 1 commit into
PyAV-Org:masterfrom
jorenham:typing/container/stubtest-fixes
Oct 21, 2026
Merged

WyattBlue merged 1 commit into
PyAV-Org:masterfrom
jorenham:typing/container/stubtest-fixes

Conversation

@jorenham

Copy link
Copy Markdown
Contributor

This fixes the following stubtest errors:

av.container.core.Chapter is not present at runtime
av.container.core.Container is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
av.container.core.Real is not present at runtime

av.container.input.InputContainer cannot be subclassed at runtime, but isn't marked with @final in the stub

av.container.output.OutputContainer cannot be subclassed at runtime, but isn't marked with @final in the stub
av.container.output.OutputContainer is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub

av.container.streams.StreamContainer cannot be subclassed at runtime, but isn't marked with @final in the stub
av.container.streams.StreamContainer is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
av.container.streams.StreamContainer.__getitem__ is inconsistent, stub parameter "index" should be positional-only (add "/", e.g. "key, /")

This also replaces a TypeVar with a PEP 695 inline generic type parameter, and turns a private type alias into an explicit type alias (also PEP 695).

@WyattBlue
WyattBlue merged commit f201ea8 into PyAV-Org:master Oct 21, 2026
1 check passed
@jorenham
jorenham deleted the typing/container/stubtest-fixes branch October 21, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants